Note that this is a practice quiz. This problem will be discussed in the next video, but we encourage you to try to solve it yourselves first.
How many non-negative integer numbers are there below 10000 such that their sum of digits is equal to 9?
This is correct! it is convenient to look from the point of view of digits in the number. There are four digits in the number and we split the weight 9 among them. We can start with all digits being equal to 0 and then add 1 to one of them nine times in a row. So, each time we have to pick one of four digits. These choices are unordered and the repetitions are allowed. So we are dealing with combinations of size 9 out of 4 options with repetitions and we have the formula for that.
See the next video for discussion.
Note that this is a practice quiz. This problem will be discussed in the next video, but we encourage you to try to solve it yourselves first.
How many non-negative integer numbers are there below 10000 such that their sum of digits is equal to 10?
This is correct! We can start similarly to the previous problem. There are four digits in the number and we split the weight 10 among them. We can start with all digits being equal to 0 and then add 1 to one of them ten times in a row. So, each time we have to pick one of four digits. These choices are unordered and the repetitions are allowed. So we are dealing with combinations of size 10 out of 4 options with repetitions and we have the formula for that. This gives 286. But note that we have also counted cases where we place weight 10 into one digit and these cases do not correspond to 4-digit numbers. There are four such cases and subtracting them from our intermediate result we obtain the answer to the problem.